Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: validation gas limit #260

Merged
merged 2 commits into from
Jun 17, 2020
Merged

fix: validation gas limit #260

merged 2 commits into from
Jun 17, 2020

Conversation

dekz
Copy link
Member

@dekz dekz commented Jun 17, 2020

Description

Geth shipped a breaking change which did the following.

  1. Removed the "bug" which allowed the caller to have value irrespective of their ETH balance
  2. Set the gas limit to MaxUint64 if not supplied

These two combination results in an insufficient funds as not even Vitalik has enough funds for 50 gwei @ MaxUint64 gas limit.

As a result we either need to drop (or lower) gas price to 1 wei, resulting in the user requiring 18 ETH for validation. We want to validate the gas price and protocol fee, so we cannot drop the gas price entirely. So this is out.

So we need to either fix the gas limit to something reasonable in the case we're performing a validation (eth call with ?? gas). Or we perform the Estimate gas first then the eth_call, unable to parallelize.

In /swap/v0/quote we have opted to remove the parallelization and first perform the estimate then the call.

In MetaTxn we have opted to fix the gas limit to 10e6 as we do not yet have a signer. The reason we wanted to perform them in parallel is for speed and to reveal the eth_call error, not the gas estimation error.

@dekz dekz requested a review from opaolini June 17, 2020 01:54
@dekz dekz force-pushed the fix/validation-gas-limit branch from 1e4e564 to 0c5af4b Compare June 17, 2020 02:29
@dekz dekz changed the title Fix/validation gas limit fix: validation gas limit Jun 17, 2020
@dekz dekz force-pushed the fix/validation-gas-limit branch from 0c5af4b to 0489051 Compare June 17, 2020 02:47
@dekz
Copy link
Member Author

dekz commented Jun 17, 2020

deploy staging

@dekz dekz force-pushed the fix/validation-gas-limit branch from 0489051 to 4e3163b Compare June 17, 2020 03:26
@dekz
Copy link
Member Author

dekz commented Jun 17, 2020

deploy production

@dekz dekz merged commit f50425c into master Jun 17, 2020
@dekz dekz deleted the fix/validation-gas-limit branch June 17, 2020 22:33
github-actions bot pushed a commit that referenced this pull request Jun 22, 2020
# [1.9.0](v1.8.0...v1.9.0) (2020-06-22)

### Bug Fixes

* asset swapper monorepo f14b6f2ba ([#257](#257)) ([a03630a](a03630a))
* Disable quote validation temporarily ([#259](#259)) ([6064f3e](6064f3e))
* filter tokens in prices which do not exist on the network ([#265](#265)) ([864ea92](864ea92))
* Fix parameters sent off to RFQT providers to be unescaped ([#264](#264)) ([939cae1](939cae1))
* validation gas limit ([#260](#260)) ([f50425c](f50425c)), closes [#259](#259)
* WETH wrap gas estimate ([#256](#256)) ([f07b4a8](f07b4a8))

### Features

* add signer liveness status gauge ([#255](#255)) ([11446e7](11446e7))
* support renamed parameters in RFQT maker endpoint ([#258](#258)) ([d83bbb1](d83bbb1))
@github-actions
Copy link

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant